//
//  UIButton+Extension.swift
//  SingWeibo
//
//  Created by shiying on 15/12/21.
//  Copyright © 2015年 shiying. All rights reserved.
//

// Ps: 返回的是当前对象的本身，所以不需要再创建了

import UIKit
extension UIButton {
    convenience init(imageName: String, title: String, fontSize: CGFloat) {
        self.init()
        
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
        setTitle(title, forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
    }

}